package com.shoplook2025.good.api.dao;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shoplook2025.good.model.Goods;
import com.shoplook2025.good.model.search.GoodsSearchBean;
import org.apache.ibatis.annotations.Mapper;

/**
 * @author yan
 * @date 2025/8/26
 */
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {

    default Page<Goods> findAll(Page<Goods> page, GoodsSearchBean gsb){
        LambdaQueryWrapper<Goods> qw = Wrappers.lambdaQuery(gsb);
        return this.selectPage(page,qw);
    }
}
